package ${package.Entity};

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
<#list table.fields as field>
    <#if field.columnType == 'LOCAL_DATE_TIME' || field.columnType =='LOCAL_DATE'>
import java.time.LocalDateTime;
    </#if>
</#list>
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * ${table.comment!}
 *</p>
 *
 * @author ${author}
 * @date ${date}
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("${table.name!}")
@ApiModel(description = "${table.comment!}")
public class ${entity} implements Serializable {

<#if entitySerialVersionUID>
    private static final long serialVersionUID = 1L;
</#if>
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>

    <#--<#if field.comment!?length gt 0>-->
    <#--/**-->
     <#--* ${field.comment}-->
     <#--*/-->
    <#--</#if>-->
    @ApiModelProperty("${field.comment}")
    <#--@Column(name = "${field.name}")-->
    <#if field.keyFlag>
    @TableId(value = "${field.name}", type = IdType.AUTO)
    <#else>
    @TableField(value = "${field.name}")
    </#if>
    <#if field.columnType == 'LOCAL_DATE_TIME' || field.columnType == 'LOCAL_DATE'>
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    </#if>
    private <#if field.columnType == 'LOCAL_DATE_TIME' || field.columnType == 'LOCAL_DATE'>LocalDateTime<#else>${field
.propertyType}</#if> ${field.propertyName};
</#list>

<#------------  END 字段循环遍历  ---------->

}